package com.hxzy.module.store.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hxzy.module.store.entity.StoreAccount;
import com.hxzy.module.store.service.StoreAccountService;
import com.hxzy.module.store.mapper.StoreAccountMapper;
import org.springframework.stereotype.Service;

/**
* @author 11452
* @description 针对表【store_account(门店账户表)】的数据库操作Service实现
* @createDate 2024-01-26 09:21:00
*/
@Service
public class StoreAccountServiceImpl extends ServiceImpl<StoreAccountMapper, StoreAccount>
    implements StoreAccountService{

    @Override
    public StoreAccount findByCount(String account, Long merchantId) {
        LambdaQueryWrapper<StoreAccount> queryWrapper=new LambdaQueryWrapper<>();
        queryWrapper.eq(StoreAccount::getAccount,account);
        queryWrapper.eq(StoreAccount::getMerchantId,merchantId);
        return this.getOne(queryWrapper);
    }
}




